﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wucNewsList.ascx.cs" Inherits="Modules_WebsiteFrontEnd_wucNewsList" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="DevExpress.Web.v8.1, Version=8.1.1.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>
<%@ Register Src="wucNewsPreview.ascx" TagName="wucNewsPreview" TagPrefix="uc2" %>
<asp:UpdatePanel ID="UpdatePanelList" runat="server">
    <ContentTemplate>
        <table border="0" cellpadding="0" cellspacing="0" width="790px" class="TableGrayBorder">
            <tbody>
                <tr height="30px">
                    <td align="center">
                        <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#f0f2f4">
                            <tbody>
                                <tr height="30px">                                    
                                    <td width="50px" valign="middle" align="right">
                                        Mã tin &nbsp;
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtNewsId" runat="server" Width="50px" Height="17px"></asp:TextBox>
                                    </td>
                                    <td width="60px" valign="middle" align="right">
                                        Tiêu đề &nbsp;
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtTittle" runat="server" Width="100px" Height="17px"></asp:TextBox>
                                    </td>
                                    <td width="80px" valign="middle" align="right">
                                        Tình trạng &nbsp;
                                    </td>
                                    <td width="110px" valign="middle" align="right">
                                        <telerik:RadComboBox ID="rcbNewsActive" runat="server" ShowToggleImage="True" Skin="Vista"
                                            Width="110px" AutoPostBack="false">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="Chờ phát hành" Value="1" />
                                                <telerik:RadComboBoxItem Text="Đã phát hành" Value="0" />                                                
                                            </Items>
                                        </telerik:RadComboBox>
                                    </td>                                    
                                    <td width="70px" valign="middle" align="right">
                                        Ngày đăng &nbsp;
                                    </td>
                                    <td>
                                        <telerik:RadDatePicker ID="rdtpDateTime" Font-Bold="true" DateInput-DisplayDateFormat="dd/MM/yyyy"
                                            runat="server" Width="100px" AutoPostBack="false">
                                        </telerik:RadDatePicker>
                                    </td>
                                    <td width="70px" valign="middle" align="right">
                                        Ngôn ngữ &nbsp;
                                    </td>
                                    <td>
                                        <telerik:RadComboBox ID="rcbLanguage" runat="server" ShowToggleImage="True" Skin="Vista"
                                            Width="150px" AutoPostBack="false">
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <telerik:RadGrid ID="rgrdGridDataList" runat="server" Skin="WebBlue" Width="790px"
                            PageSize="20" AllowMultiRowSelection="true" AllowPaging="True" ShowGroupPanel="false"
                            AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
                            BorderWidth="0px" GridLines="None" AutoGenerateColumns="false" OnPageIndexChanged="rgrdGridDataList_PageIndexChanged"
                            AllowSorting="false" OnItemCommand="rgrdGridDataList_ItemCommand">
                            <ClientSettings EnablePostBackOnRowClick="True">
                                <Selecting AllowRowSelect="True" />
                            </ClientSettings>
                            <PagerStyle Mode="NextPrevAndNumeric" NextPagesToolTip="Trang sau" NextPageToolTip="Trang sau"
                                PagerTextFormat="Lựa chọn trang: {4} &amp;nbsp;Trang {0} / {1}, bản ghi {2} - {3} / {5}."
                                PrevPagesToolTip="Trang trước" PrevPageToolTip="Trang trước" />
                            <MasterTableView DataKeyNames="NewsID">
                                <RowIndicatorColumn Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Resizable="False" Visible="False">
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                                <EditFormSettings>
                                    <PopUpSettings ScrollBars="None" />
                                </EditFormSettings>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="NewsID" HeaderText="ID" ReadOnly="True" UniqueName="NewsID">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Tittle" HeaderText="TIÊU ĐỀ" UniqueName="Tittle"
                                        ReadOnly="true" ItemStyle-HorizontalAlign="left" ItemStyle-Width="200px" HeaderStyle-HorizontalAlign="center">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="NewsCode" HeaderText="LOẠI TIN" UniqueName="NewsCode"
                                        ReadOnly="true" ItemStyle-HorizontalAlign="left" ItemStyle-Width="60px" HeaderStyle-HorizontalAlign="center">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CategoryID" HeaderText="CHUYÊN MỤC" UniqueName="CategoryID"
                                        ReadOnly="true" ItemStyle-HorizontalAlign="left" ItemStyle-Width="120px" HeaderStyle-HorizontalAlign="center">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CreatDate" HeaderText="NGÀY TẠO" UniqueName="CreatDate"
                                        ReadOnly="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}"
                                        HeaderStyle-HorizontalAlign="center">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Creater" HeaderText="NGƯỜI TẠO" ReadOnly="true"
                                        UniqueName="Creater" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70px"
                                        HeaderStyle-HorizontalAlign="center">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridClientSelectColumn UniqueName="SelectRow" CommandName="RowClick">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="24px" />
                                    </telerik:GridClientSelectColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/icons/newspreview_small.png"
                                        UniqueName="NewsPreview" CommandName="RowPreview" Text="Xem">
                                        <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" Width="24px" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/icons/editrow.png"
                                        UniqueName="NewsEdit" CommandName="RowEdit" Text="Sửa">
                                        <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" Width="24px" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridButtonColumn ConfirmText="Bạn có muốn xóa bản ghi được lựa chọn?" ConfirmDialogType="Classic"
                                        ConfirmTitle="Xóa bản ghi" ButtonType="ImageButton" CommandName="RowDelete"
                                        Text="Xóa" ImageUrl="~/Images/icons/recyclebin.png" UniqueName="NewsDelete">
                                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="24px" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/icons/publishingsmall.png"
                                        UniqueName="NewsPublish" CommandName="RowPublish" Text="Lên trang">
                                        <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" Width="24px" />
                                    </telerik:GridButtonColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/icons/Unpublish.png"
                                        UniqueName="NewsUnPublish" CommandName="RowUnPublish" Text="Gỡ xuống">
                                        <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" Width="24px" />
                                    </telerik:GridButtonColumn>                                    
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </td>
                </tr>
            </tbody>
        </table>
        <!--PREVIEW POPUP==============================================================-->
        <telerik:RadWindowManager Visible="true" ID="rwdmanager" Skin="Vista" VisibleOnPageLoad="false"
            runat="server">
            <Windows>
                <telerik:RadWindow ID="previewwindow" runat="server" Skin="Vista" Width="750px" Height="500px"
                    Title="Xem bản tin">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
        <!--PREVIEW POPUP==============================================================-->
    </ContentTemplate>
</asp:UpdatePanel>
